<?php
/**
 * 日志管理
 * @author zlian
 *
 */
namespace Userslog\Controller;

use Admin\Controller\AdminbaseController;
class LogController extends AdminbaseController {
	
	protected $m;
	
	function _initialize(){
		parent::_initialize();
		$this->m = D('UsersLog');
	}

	
	
    public function index(){
		$this->display();
    }
    
    
    
    public function changestatus(){
    	$data[$this->m->getPk()] = $_REQUEST['id'];
    	$data['status'] = $_REQUEST['status'];
    	$data['update_time'] = date('Y-m-d H:i:s');
    	if($this->m->save($data)){
    		$this->success('状态更新成功');
    	}else{
    		$this->error('状态更新失败');
    	}
    }
}